package com.iqiyi.pps.epg.core.rpc.qipu;


import com.google.protobuf.Message;
import com.iqiyi.pps.epg.api.model.web.program.TProgram;
import com.iqiyi.pps.epg.core.model.channel.ChannelBase;
import com.iqiyi.pps.epg.core.model.control.IPlatformControl;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: rainliang
 * Date: 13-08-25
 * Time: 下午11:50
 * 优化写奇谱
 */
public interface QipuService {

    /**
     * 读取奇谱实体数据
     *
     * @param qipuId
     * @return
     */
    public Message getEntityByqipuId(Long qipuId);

    /**
     * 注册奇谱id
     *
     * @param type
     * @param total_count
     * @return
     */
    public List<Long> registerQipuId(int type, int total_count);

    /**
     * 将奇谱实体置为删除
     *
     * @param entityId
     * @param del
     * @return
     */
    public int setObjectDeletedToQipu(Long entityId, boolean del);


    // --------------- 写直播频道新频道信息相关[BEGIN]------------------//
    /**
     * 写新奇谱结构live_channel_base信息
     *
     * @param entityId
     * @return
     */
    public int setLiveChannelBaseToQipu(Long entityId, ChannelBase channelBase);


    /** 新方法
     * 写新奇谱频道播控信息
     * 写新奇谱节目播控信息
     * @param entityId
     * @return
     */
    public boolean addAccessPlayControlToQipu(long entityId,boolean searchForbidden, List<? extends IPlatformControl> platformControlList);

    /**
     * 同步新，老奇谱节目单集合数据
     */
    public void syncProgramDataList(boolean syncFlag);

    /**
     * 立刻同步新，老奇谱节目单数据
     * @param tProgram
     */
    public void syncProgramData(TProgram tProgram,boolean syncFlag);

    public void syncProgramDataByFatherId(long fatherId);

    // --------------- 写直播频道老奇谱信息相关[BEGIN]------------------//

    /**
     * 从 channel_base 表中取出需要同步的频道列表，逐个写频道信息到奇谱
     */
    public void syncChannelDataList();

}
